package com.ff.cms.util;

import javax.sql.DataSource;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.druid.pool.DruidDataSource;

//spring自动扫描加载此类
@Configuration
public class DruidDataSourceConfig {

	    @Bean
		@ConfigurationProperties(prefix = "spring.datasource")
	    public DataSource druid() {
	        return new DruidDataSource();
	    }
	
}
